<?php
/**
* Description:
* @Author: Tudo<997470395@qq.com>
* @Created: 2015-4-8 上午11:51:01
*/
namespace Home\Model;
use Think\Model;
class CategoryModel extends Model
{
	public function categoryInfo($cid){
		$where['id'] =(is_array($cid))?array("in",$cid):$cid;
		$category = $this->where($where) ->select();
		if(empty($category)) return null;
		return $category;
	}
	
	public function allCategory(){
		$datas = $this->where(array('parent_id'=>0,'display'=>1))->select();
		//echo $this->getLastSql();
		return $datas;
	}
	
}